package com.xuecheng.search.service;

import com.xuecheng.commons.model.dto.CoursePubIndexDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.ResponseResult;

import java.io.IOException;

public interface SearchService {


    // 同步索引库
    void saveDocument(Long coursePubId) throws IOException;

    // 课程搜索
    ResponseResult search(PageRequest params, CoursePubIndexDto dto) throws IOException;

    // 根据id查询
    ResponseResult findById(String id) throws IOException;

    //课程下架
    void removeByCourseId(Long coursePubId) throws IOException;
}
